<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\validate;

/**
 * 公司认证验证器
 */
class Company extends AdminBase
{

    // 验证规则
    protected $rule = [
        'company'  => 'require',
        'user_id'  => 'require|unique:company',
        'title'  => 'require',
        'person'  => 'require',
        'phone'  => 'require',
    ];

    // 验证提示
    protected $message = [
        'company.require'    => '请提交公司全称',
        //'company.unique'       => '该公司名称已提交过认证',
        'title.require'    => '公司简称不能为空',
        'person.require'    => '公司法人不能为空',
        'phone.require'    => '联系电话不能为空',
    ];

    // 应用场景
    protected $scene = [
        'company'  =>  ['company','title','person','phone'],
    ];
    
}
